<html>
<head>
    <script src="/js/validate.js" type="text/javascript"></script>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body style="background-color: transparent">
<form id="id-form" name="frm" method="post" action="/city/danhmuctinhthanh/save">
	<div id="toolbar-button">
			<div class="item" onclick="save()" name="SAVE" id="itemButton2" title="Lưu">
				<div id="save-global-button"></div>
			</div>
			<div class="item" onclick="back()" id="itemButton3" title="Trở lại">
				<div id="back-global-button"></div>				
			</div>
	</div>
    <input type=hidden name="id" value="<?=$this->data['CITYID'] ?>" />
    <input type=hidden name="flag" value="<?=$this->flag ?>" />
 
        <table valign="center">
        <?php $id = $this->data['CITYID']; ?>
        <tr>
            <td nowrap="nowrap">Tên tỉnh thành<font color="red">*</font></td>
            <td><input class="inp-form" id="idName" name ="name" value="<?=$this->data['NAME'];?>"type ="text" size ="30" maxlength="50">
                <span style="color: red" id="errtname"></span>
            </td>
            <script>
                document.frm.name.focus();
            </script>
        </tr>        
    </table>
</form>
<Script language="JavaScript">
    function  save(){
    	var vlidName= document.getElementById('idName');
    	if(vlidName.value==""){
    		alert('Tên tỉnh thành không được rỗng');
    		flag=1;
    		return;
    	}
    	else{
			flag=0;
        	}
    	if(flag==0){
    		document.frm.submit();
    	}else{
        	document.location.href='/city/danhmuctinhthanh/input';
        	}
    }

    function back(){
        document.location.href='/city/danhmuctinhthanh/index';
    }
</Script>
</body>
</html>
